home *** CD-ROM | disk | FTP | other *** search
- /* biostime --- p 571 */
- #include <stdio.h>
- #include <bios.h>
- #define TIME_GETCLOCK 0
- main()
- {
- long oldcount, newcount;
- int ticks;
- printf("How many seconds to wait? ");
- scanf("%d", &ticks);
- ticks *= 18.2;
- oldcount = biostime(TIME_GETCLOCK, 0L);
- newcount = oldcount;
- while ((newcount-oldcount) < ticks)
- newcount = biostime(TIME_GETCLOCK,0L);
- printf("\nwaited for %d clock ticks\n", ticks);
- }